package com.fiona.register.api;

import com.fiona.core.remoting.model.FionaApiServiceObj;
import com.fiona.core.remoting.model.Service;

/**
 *
 * 默认服务注册器
 * 
 */
public abstract class AbstractServiceRegister implements ServiceRegister {

	@Override
	public void register(Service service) throws Exception {
		if (service == null) {
			throw new IllegalArgumentException("parameter cannot be empty");
		}
		doRegister(service);
		FionaApiServiceObj.putService(service.getServiceId(), service);
	}

	public abstract void doRegister(Service service);

}
